package com.fs.dao.Impl;

import com.fs.dao.QuestionTypeDao;
import com.fs.pojo.QuestionType;
import com.fs.utils.JDBCUtils;

import java.util.List;

public class QuestionTypeDaoImpl implements QuestionTypeDao {

    
    public QuestionType queryById(Integer id) {

        String sql = "select * from tb_question_type where  id = ?";

        List<QuestionType> questionTypes = JDBCUtils.executeQurey(sql, QuestionType.class, id);

        return questionTypes == null ? null : questionTypes.get(0);
    }


    @Override
    public QuestionType queryById(String id) {

        return null;
    }

    @Override
    public List queryAll() {
        String sql = "SELECT * FROM tb_question_type ";
        List<QuestionType> questionTypes = JDBCUtils.executeQurey(sql, QuestionType.class);

        return questionTypes;
    }

    @Override
    public int insert(QuestionType obj) {
        return 0;
    }

    @Override
    public int deleteById(String id) {
        return 0;
    }

    @Override
    public int update(QuestionType obj) {
        return 0;
    }


}